package com.mind.adjust.service.impl;

import com.mind.system.domain.AjBasicApplicationCompanyMapping;
import com.mind.adjust.mapper.AjBasicApplicationCompanyMappingMapper;
import com.mind.adjust.service.AjBasicApplicationCompanyMappingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * (AjBasicApplicationCompanyMapping)表服务实现类
 *
 * @author makejava
 * @since 2024-12-02 15:15:14
 */
@Service("basicApplicationCompanyMappingService")
public class AjBasicApplicationCompanyMappingServiceImpl implements AjBasicApplicationCompanyMappingService {
    @Autowired
    private AjBasicApplicationCompanyMappingMapper basicApplicationCompanyMappingMapper;

    /**
     * 查询信息集合
     * 
     * @param basicApplicationCompanyMapping 信息
     * @return 信息集合
     */
    @Override
    public List<AjBasicApplicationCompanyMapping> selectBasicApplicationCompanyMappingList(AjBasicApplicationCompanyMapping basicApplicationCompanyMapping)
    {
        return basicApplicationCompanyMappingMapper.selectBasicApplicationCompanyMappingList(basicApplicationCompanyMapping);
    }

    /**
     * 通过ID查询信息
     * 
     * @param basicApplicationCompanyMappingId ID
     * @return 角色对象信息
     */
    @Override
    public AjBasicApplicationCompanyMapping selectBasicApplicationCompanyMappingById(Long basicApplicationCompanyMappingId)
    {
        return basicApplicationCompanyMappingMapper.selectBasicApplicationCompanyMappingById(basicApplicationCompanyMappingId);
    }

    /**
     * 删除信息
     * 
     * @param basicApplicationCompanyMappingId ID
     * @return 结果
     */
    @Override
    public int deleteBasicApplicationCompanyMappingById(Long basicApplicationCompanyMappingId)
    {
        return basicApplicationCompanyMappingMapper.deleteBasicApplicationCompanyMappingById(basicApplicationCompanyMappingId);
    }

    /**
     * 批量删除信息
     * 
     * @param basicApplicationCompanyMappingIds 需要删除的ID
     * @return 结果
     */
    @Override
    public int deleteBasicApplicationCompanyMappingByIds(String[] basicApplicationCompanyMappingIds)
    {
        return basicApplicationCompanyMappingMapper.deleteBasicApplicationCompanyMappingByIds(basicApplicationCompanyMappingIds);
    }

    /**
     * 新增保存信息
     * 
     * @param basicApplicationCompanyMapping 信息
     * @return 结果
     */
    @Override
    public int insertBasicApplicationCompanyMapping(AjBasicApplicationCompanyMapping basicApplicationCompanyMapping)
    {
        return basicApplicationCompanyMappingMapper.insertBasicApplicationCompanyMapping(basicApplicationCompanyMapping);
    }

    /**
     * 修改保存信息
     * 
     * @param basicApplicationCompanyMapping 信息
     * @return 结果
     */
    @Override
    public int updateBasicApplicationCompanyMapping(AjBasicApplicationCompanyMapping basicApplicationCompanyMapping)
    {
        return basicApplicationCompanyMappingMapper.updateBasicApplicationCompanyMapping(basicApplicationCompanyMapping);
    }
    
    /**
     * 批量插入
     *
     * @param basicApplicationCompanyMappingList 附件类型信息
     * @return 结果
     */
    @Override
    public int batchInsert(List<AjBasicApplicationCompanyMapping> basicApplicationCompanyMappingList) {
        int size = 0;
        for(AjBasicApplicationCompanyMapping basicApplicationCompanyMapping: basicApplicationCompanyMappingList) {
//            if (basicApplicationCompanyMappingMapper.selectBasicApplicationCompanyMappingByName(basicApplicationCompanyMapping.getName()) == null){
//                basicApplicationCompanyMappingMapper.insertBasicApplicationCompanyMapping(basicApplicationCompanyMapping);
//                size ++;
//            }
        }
        return size;
    }
}
